//
//  HomeCell.swift
//  ----meilishuo
//
//  Created by wkywangking on 2017/3/2.
//  Copyright © 2017年 wkywangking. All rights reserved.
//

import UIKit
import Kingfisher


class HomeCell: UICollectionViewCell {
    // 自定义cell,imageView拖线
    @IBOutlet weak var imageView: UIImageView!

    // 定义模型属性
    var shopModel: shopModel? {
        // 监听属性值的变化
        didSet{
            guard let shopModel = shopModel else {
                return
            }
            let url = URL(string: shopModel.thumb_url)
            let placeholderImage = UIImage(named: "empty_picture")
            self.imageView.kf.setImage(with: url, placeholder: placeholderImage)
        }
    }
}
